#
# Be sure to run `pod lib lint JMKJCommonTools.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'JMKJCommonTools'
  s.version          = '0.1.0'
  s.summary          = 'ios common tools'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
聚名科技有限公司移动部ios使用到的公共工具类,仅限公司内部使用
                       DESC

  s.homepage         = 'https://toscode.gitee.com/yllove/jmkj-common-tools.git'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'AlbertYuan' => 'yuanliangios@163.com' }
  s.source           = { :git => 'https://toscode.gitee.com/yllove/jmkj-common-tools.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '12.0'

  s.source_files = 'JMKJCommonTools/Classes/*'
#  s.resources    = 'JMKJBaseTools/Resources/**/*'
  s.swift_versions = "5.0" 

  # s.resource_bundles = {
  #   'JMKJCommonTools' => ['JMKJCommonTools/Assets/*.png']
  # }
  # s.public_header_files = 'Pod/Classes/**/*.h'
  s.frameworks = 'UIKit'
  s.dependency 'SDBridgeSwift'


  # Extension
  s.subspec 'Extensions' do |e|
    # e.source_files = 'JMKJCommonTools/Classes/Extensions/*'
    # e.resources    = 'JMKJCommonTools/Classes/CopyLabel/Resources/**/*'

    e.subspec 'Swift' do |sw|
      sw.source_files = 'JMKJCommonTools/Classes/Extensions/Swift/*'
      sw.dependency 'RxSwift'
      sw.dependency 'RxCocoa'
      sw.dependency 'RxGesture'
      sw.dependency 'KeychainAccess'
    end

    e.subspec 'Objective-c' do |o|
      o.source_files = 'JMKJCommonTools/Classes/Extensions/Objective-c/*'
    end
  end


  # Libs
  s.subspec 'Libs' do |l|
    # CopyLabel
    l.subspec 'CopyLabel' do |c|
      c.source_files = 'JMKJCommonTools/Classes/Libs/CopyLabel/*'
    end

    # Storage
    l.subspec 'Storage' do |st|
      st.source_files = 'JMKJCommonTools/Classes/Libs/Storage/*'
    end

    # HYLabel
    l.subspec 'HYLabel' do |hylabel|
      hylabel.source_files = 'JMKJCommonTools/Classes/Extensions/Swift/Extension+Color.swift','JMKJCommonTools/Classes/Libs/HYLabel/*'
    end

    # ActivityIndicatiorView
    l.subspec 'ActivityIndicatiorView' do |ac|
      ac.source_files = 'JMKJCommonTools/Classes/Libs/ActivityIndicatiorView/*'
      ac.subspec 'Animations' do |av|
        av.source_files = 'JMKJCommonTools/Classes/Libs/ActivityIndicatiorView/Animations/*','JMKJCommonTools/Classes/Libs/ActivityIndicatiorView/SPActivityIndicatorAnimationProtocol.h'
      end
    end

    # WZHCountDown
    l.subspec 'WZHCountDown' do |wzhCountDown|
      wzhCountDown.source_files = 'JMKJCommonTools/Classes/Libs/WZHCountDown/*'
    end

    # WZHDelay
    l.subspec 'WZHDelay' do |wzhDelay|
      wzhDelay.source_files = 'JMKJCommonTools/Classes/Libs/WZHDelay/*'
    end

    # WZHNetworkMonitor
    l.subspec 'WZHNetworkMonitor' do |wzhNetworkMonitor|
      wzhNetworkMonitor.source_files = 'JMKJCommonTools/Classes/Libs/WZHNetworkMonitor/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      wzhNetworkMonitor.dependency 'RxSwift'
      wzhNetworkMonitor.dependency 'RxCocoa'
      wzhNetworkMonitor.dependency 'RxGesture'
      wzhNetworkMonitor.dependency 'KeychainAccess'
      wzhNetworkMonitor.frameworks = 'Network'
    end

    # WZHOperationUtil
    l.subspec 'WZHOperationUtil' do |wzhOperationUtil|
      wzhOperationUtil.source_files = 'JMKJCommonTools/Classes/Libs/WZHOperationUtil/*'
    end

    # WZHUIKeyboardManage
    l.subspec 'WZHUIKeyboardManage' do |wzhUIKeyboardManage|
      wzhUIKeyboardManage.source_files = 'JMKJCommonTools/Classes/Libs/WZHUIKeyboardManage/*'
      wzhUIKeyboardManage.dependency 'SwiftNotificationCenter'
    end

    # WZHV2FPSLabel
    l.subspec 'WZHV2FPSLabel' do |wzhV2FPSLabel|
      wzhV2FPSLabel.source_files = 'JMKJCommonTools/Classes/Libs/WZHV2FPSLabel/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      wzhV2FPSLabel.dependency 'RxSwift'
      wzhV2FPSLabel.dependency 'RxCocoa'
      wzhV2FPSLabel.dependency 'RxGesture'
      wzhV2FPSLabel.dependency 'KeychainAccess'
    end

    # WZHCollectionView
    l.subspec 'WZHCollectionView' do |wzhCollectionView|
      wzhCollectionView.source_files = 'JMKJCommonTools/Classes/Libs/WZHCollectionView/*'
    end

    # NotificationsControl
    l.subspec 'NotificationsControl' do |noti|
      noti.source_files = 'JMKJCommonTools/Classes/Libs/NotificationsControl/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      noti.dependency 'RxSwift'
      noti.dependency 'RxCocoa'
      noti.dependency 'RxGesture'
      noti.dependency 'KeychainAccess'
    end

    # TimeTool
    l.subspec 'TimeTool' do |timetool|
      timetool.source_files = 'JMKJCommonTools/Classes/Libs/TimeTool/*'
    end

    # YLAESTool
    l.subspec 'YLAESTool' do |aes|
      aes.source_files = 'JMKJCommonTools/Classes/Libs/YLAESTool/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      aes.dependency 'RxSwift'
      aes.dependency 'RxCocoa'
      aes.dependency 'RxGesture'
      aes.dependency 'KeychainAccess'
      aes.dependency 'CryptoSwift'
    end

    # YLInteraciveWebBridge
    l.subspec 'YLInteraciveWebBridge' do |webBridge|
      webBridge.source_files = 'JMKJCommonTools/Classes/Libs/YLInteraciveWebBridge/*','JMKJCommonTools/Classes/Extensions/Swift/*'

      webBridge.dependency 'SDBridgeSwift'
      webBridge.dependency 'RxSwift'
      webBridge.dependency 'RxCocoa'
      webBridge.dependency 'RxGesture'
      webBridge.dependency 'KeychainAccess'

      webBridge.frameworks = 'WebKit'
      
    end

    # WZHAlert
    l.subspec 'WZHAlert' do |alert|
      alert.source_files = 'JMKJCommonTools/Classes/Libs/WZHAlert/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      alert.dependency 'RxSwift'
      alert.dependency 'RxCocoa'
      alert.dependency 'RxGesture'
      alert.dependency 'KeychainAccess'
    end

    # YLSliderVerificationView
    l.subspec 'YLSliderVerificationView' do |slider|
      slider.source_files = 'JMKJCommonTools/Classes/Libs/YLSliderVerificationView/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      slider.dependency 'RxSwift'
      slider.dependency 'RxCocoa'
      slider.dependency 'RxGesture'
      slider.dependency 'KeychainAccess'
      slider.dependency 'SnapKit'
      slider.frameworks = 'Network'
    end

    # YLPasteBoardChecker
    l.subspec 'YLPasteBoardChecker' do |boardChecker|
      boardChecker.source_files = 'JMKJCommonTools/Classes/Libs/YLPasteBoardChecker/*','JMKJCommonTools/Classes/Extensions/Swift/*'
      boardChecker.dependency 'RxSwift'
      boardChecker.dependency 'RxCocoa'
      boardChecker.dependency 'RxGesture'
      boardChecker.dependency 'KeychainAccess'
      boardChecker.dependency 'NSObject+Rx'
    end

    # YLLottieRefresh
    l.subspec 'YLLottieRefresh' do |refresh|
      refresh.source_files = 'JMKJCommonTools/Classes/Libs/YLLottieRefresh/*'
      refresh.dependency 'lottie-ios'
      refresh.dependency 'MJRefresh'
      refresh.dependency 'SnapKit'
    end

  end

end
